package com.tj.service.impl;
/**
 *
 * @author:王丽静
 * 接口实现类 DoctorServiceImpl
 *
 */
import com.tj.mapper.DoctorMapper;
import com.tj.pojo.Doctor;
import com.tj.service.DoctorService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DoctorServiceImpl implements DoctorService {
    @Resource
    private DoctorMapper doctorMapper;

    @Override
    public List<Doctor> findAllList() {
        return doctorMapper.findAllList();
    }

    @Override
    public List<Doctor> findDocListByName(String realName) {
        return doctorMapper.findDocListByName(realName);
    }

    @Override
    public Doctor findDocById(int docId) {
        return doctorMapper.findDocById(docId);
    }

    @Override
    public int insertDoctor(Doctor doctor) {
        return doctorMapper.insertDoctor(doctor);
    }

    @Override
    public int updateDoctor(Doctor doctor) {
        return doctorMapper.updateDoctor(doctor);
    }

    @Override
    public int deleteDoctor(Doctor doctor) {
        return doctorMapper.deleteDoctor(doctor);
    }

    public Doctor login(Doctor doctor){
        return doctorMapper.login(doctor);
    }
}
